#include <vector>
#include <string>
#include <iostream>

using namespace std;

template<typename T>
void Print(T& collection)
{
	for (auto& item : collection)
	{
		std::cout << item << " ";
	}
	std::cout << std::endl;
}

int main()
{
	vector<string> stringVector(10, "hello");

	for (auto it{ begin(stringVector) }; it != end(stringVector); ++it) {
		it->append(" there");
	}
/*
	// Using Range-Based for loop
	for (auto& str : stringVector) {
		str.append(" there");
	}
*/

Print(stringVector);
}
